package org.wlgzs.shop.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.wlgzs.shop.bean.CollectGoods;
import org.wlgzs.shop.bean.CollectGoodsExample;
import org.wlgzs.shop.dao.CollectGoodsMapper;
import org.wlgzs.shop.service.ICollectGoodService;

import java.util.List;

/**
 * @Author: Ben
 * @Date: 2019/5/29 21:14
 * @Project org.wlgzs.shop
 */
@Service(value = "/CollectGoodService")
public class CollectGoodServiceImpl implements ICollectGoodService {
   @Autowired
    CollectGoodsMapper collectGoodsMapper;

    @Override
    public List<CollectGoods> selectCollectGoodsService(int userId) {
        CollectGoodsExample collectGoodsExample=new CollectGoodsExample();
        CollectGoodsExample.Criteria criteria=collectGoodsExample.createCriteria();
        criteria.andUserIdEqualTo(userId);
        List<CollectGoods> collectGoodsList=collectGoodsMapper.selectByExample(collectGoodsExample);
        return collectGoodsList;
    }
}
